package com.healthy.entity;

import java.util.HashSet;
import java.util.Set;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * 
 * @author HGB丶阳光
 * @date 2020年6月10日
 * @description: 商品实体类创建
 *
 */
@JsonIgnoreProperties(value = {"handler"})
public class YgMerch implements java.io.Serializable {
	
   /**
	 * 解决复杂实体类之间产生的序列化问题
	 */
	private static final long serialVersionUID = 4148905995892346363L;
	
   private String mid;           // 商品表主键 mid
   private String merchName;     // 商品名称，必须字段
   private String merchNo;       // 商品编号，必须字段
   private String merchType;     // 商品类型， 必须字段
   private String introduce;     // 商品介绍, 必须字段
   private Double retailPrice;   // 商品零售价,必须字段
   private Integer surpAmount;   // 商品库存,必须字段
   private String imgPath;       // 商品图片,必须字段
   private Integer status;       // 商品状态，1.审核中 2.已上架 3.已下架
   private YgUsers ygUsers;      // 与用户实体类一对一关联
   
   private Set<YgComments> commentslist = new HashSet<>();  // 商品与评论一对多关联
   private Set<YgOrders> orderslist = new HashSet<>();  // 商品与订单多对多关联
   
public YgMerch() {
}

public YgMerch(String mid, String merchName, String merchNo, String merchType, String introduce, Double retailPrice,
		Integer surpAmount, String imgPath, Integer status, YgUsers ygUsers, Set<YgComments> commentslist,
		Set<YgOrders> orderslist) {
	this.mid = mid;
	this.merchName = merchName;
	this.merchNo = merchNo;
	this.merchType = merchType;
	this.introduce = introduce;
	this.retailPrice = retailPrice;
	this.surpAmount = surpAmount;
	this.imgPath = imgPath;
	this.status = status;
	this.ygUsers = ygUsers;
	this.commentslist = commentslist;
	this.orderslist = orderslist;
}


public String getMid() {
	return mid;
}

public void setMid(String mid) {
	this.mid = mid;
}

public String getMerchName() {
	return merchName;
}

public void setMerchName(String merchName) {
	this.merchName = merchName;
}

public String getMerchNo() {
	return merchNo;
}

public void setMerchNo(String merchNo) {
	this.merchNo = merchNo;
}

public String getMerchType() {
	return merchType;
}

public void setMerchType(String merchType) {
	this.merchType = merchType;
}

public String getIntroduce() {
	return introduce;
}

public void setIntroduce(String introduce) {
	this.introduce = introduce;
}

public Double getRetailPrice() {
	return retailPrice;
}

public void setRetailPrice(Double retailPrice) {
	this.retailPrice = retailPrice;
}

public Integer getSurpAmount() {
	return surpAmount;
}

public void setSurpAmount(Integer surpAmount) {
	this.surpAmount = surpAmount;
}

public String getImgPath() {
	return imgPath;
}

public void setImgPath(String imgPath) {
	this.imgPath = imgPath;
}

public YgUsers getygUsers() {
	return ygUsers;
}

public void setygUsers(YgUsers ygUsers) {
	this.ygUsers = ygUsers;
}

public Set<YgComments> getCommentslist() {
	return commentslist;
}

public void setCommentslist(Set<YgComments> commentslist) {
	this.commentslist = commentslist;
}

public Set<YgOrders> getOrderslist() {
	return orderslist;
}

public void setOrderslist(Set<YgOrders> orderslist) {
	this.orderslist = orderslist;
}

public Integer getStatus() {
	return status;
}

public void setStatus(Integer status) {
	this.status = status;
}



@Override
public String toString() {
	return "YgMerch [mid=" + mid + ", merchName=" + merchName + ", merchNo=" + merchNo + ", merchType=" + merchType
			+ ", introduce=" + introduce + ", retailPrice=" + retailPrice + ", surpAmount=" + surpAmount + ", imgPath="
			+ imgPath + ", status=" + status + ", ygUsers=" + ygUsers + ", commentslist=" + commentslist
			+ ", orderslist=" + orderslist + "]";
}



}
